package com.nwpu.vote.parser;

import java.io.IOException;
import java.io.InputStream;
import java.util.Date;

import javax.jdo.JDOObjectNotFoundException;
import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.fileupload.util.Streams;
import org.apache.commons.io.IOUtils;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

import com.nwpu.vote.control.VotePersistentImpl;
import com.nwpu.vote.model.*;
import com.nwpu.vote.util.*;

public class UserParser implements IUserParser{

	public Vote parse(HttpServletRequest req) throws InvalidNewUserException{
		
		String name = null;
		String department = null;
		String mail = null;
		String phone = null;
		String mobile = null;
		String description = null;
		
		// Check that we have in a new vote request
		
		
		
		
		
		
		
		
		VoteUser user = new VoteUser(KeyFactory.createKey(, ), name, 
				department, mail, new Date(), phone, mobile, description);
		
		
		
		
		return user;
	}
}
